(1) Field of the Invention
The present invention relates to a digital video recording apparatus and a method for recording audio and to video signals to a recording medium digitally.
(2) Description of the Related Art
Conventionally, when using a function of digital video recording apparatuses which stops recording of commercials (hereinafter “commercial cut recording”), a time lag occurs between recording and until recording actually stops, meaning that sound and images are recorded during this time lag.
The following is an explanation of a digital video recording apparatus that records and plays backs broadcasts.
FIG. 1 is a function block diagram of a digital video recording apparatus.
In the figure, a digital video recording apparatus 10 is composed of a user interface unit 11, an input unit 12, an output unit 13, a detection unit 14, an encoder unit 15, a decoder unit 16, a storage unit 17, and a system control unit 18.
The user interface unit 11 receives requests from the user to record, play back, and so on, and sends the requests to the system control unit 18. Specifically, the user interface unit 11 is an input device such as keys and an output device such as a display panel.
The input unit 12 converts sound and video signals into frame data (field data) using an A/D converter. These signals (hereinafter “audio/video signals”) are included in a signal input through an external input terminal such as an antenna terminal and a tuner (not illustrated) or an audio/video input terminal. The input unit 12 sends the converted signals to the encoder unit 15.
The output unit 13 receives frame data (field data) from the decoder unit 16, and converts the frame data into an audio/video signal using a D/A converter. Then, the output unit 13 outputs the audio/video signal to a monitor (not illustrated) through an external output terminal such as an audio/video output terminal.
The detection unit 14 monitors the audio mode signal included in the signal input into the input unit 12 and notifies the system control unit 18 if the attributes of the audio mode signal change.
Here, the audio mode signal is a signal distinguishing whether the sound is monaural or stereo. The attributes of the audio mode changing refers to the audio mode signal changing from monaural to stereo, or from stereo to monaural.
The encoder unit 15 starts encoding on receiving an instruction from the system control unit 18 to start encoding (hereinafter “encode start instruction”), and stops encoding on receiving an instruction to stop encoding (hereinafter “encode stop instruction”)
Here, encoding refers to a procedure for generating data in an MPEG (Moving Picture Experts Group) program stream format by encoding frame data (field data) sent from the input unit 12. This generated data will be referred to as a “VOB” (Video Object) hereinafter. Note that the encoder unit 15 sends the generated VOB to the storage unit 17.
The decoder unit 16 starts decoding on receiving an instruction to start decoding (hereinafter “decode start instruction”) from the system control unit 18, and stops decoding on receiving an instruction to stop decoding (hereinafter “decode stop instruction”).
Here, decoding refers to a procedure for decoding and making a VOB sent from the storage unit 17 back into frame data (field data). Note that the decoder unit 16 sends the decoded frame data (field data) to the output unit 13.
The storage unit 17 writes the VOB received from the encoder unit 15 to a recording medium on receiving an instruction to write (hereinafter “write instruction”) from the system control unit 18, and reads a VOB from a recording medium on receiving an instruction to read (hereinafter “read instruction”) from the system control unit 18. Note that the storage unit 17 sends the read VOB to the decoder unit 16.
Here, the recording medium refers to a medium that such as a DVD-RAM (Digital Versatile Disk Random Access Memory) or an HD (Hard Disk).
Note that a DVD-RAM uses ZCLV (Zone Constant Linear Velocity) physical format, and a UDF (Universal Disk Format) logical format.
The system control unit 18 controls the encoder unit 15, the decoder unit 16, and the storage unit 17. Specifically, the system control unit 18 controls encoding by giving encode start instructions and encode stop instructions to the encoder unit 15, and decoding by giving decode start instructions and decode stop instructions to the decoder unit 16. Furthermore, the system control unit 18 controls reading and writing of VOBs by giving write instructions and read instructions to the storage unit 17.
In addition, the system control unit 18 records on receiving a request from the user interface unit 11 to start recording, and plays back on receiving a request from the user interface unit 11 to play back.
Here, recording refers to the system control unit 18 giving an encoding start instruction to the encoder unit 15 and having the encoder unit 15 encode, and giving a write instruction to the storage unit 17 and having the storage unit 17 write the VOB generated by the encoding.
Here, playback refers to the system control unit 18 giving a read instruction to the storage unit 17 and having the storage unit 17 read a stored VOB, and giving a decode start instruction to the decoder unit 16 and having the decode unit 16 decode the read VOB.
Note that the system control unit 18 is a function realized by hardware such as a microcomputer, a RAM (Random Access Memory), and a ROM (Read Only Memory), and software such as a system control software.
<How Time Lag Occurs>
The following explains how time lag occurs in the digital video recording apparatus 10 having the above-described structure, using commercial cut recording as an example.
Note that commercial cut recording makes use of the switch in the attributes of the audio mode signal included in an input signal. That is, the audio mode signal switches from monaural to stereo when a broadcast proceeds from a program to a commercial, and from stereo back to monaural when the program starts again.
<Commercial Cut Recording>
FIG. 2 shows a commercial cut recording sequence.
As can be seem from the diagram, detection unit 14 monitors the attributes of the audio mode signal included in an input signal, and detects a switch in the attributes from monaural to stereo (step S21). Note that the detection unit 14 monitors the attributes continuously.
Here, the detection takes 0.5 frames (16 msec).
Then, the detection unit 14 judges that the program has stopped and a commercial has started (step S22), and notifies the system control unit 18 that the commercial has started (step S23).
Here, the judgement takes 1 frame (32 msec). This is because the attributes of the audio mode signal equal to one frame are monitored from when the switch is detected until the signal is confirmed to be stereo.
The system control unit 18 receives notification from the detection unit 14 that the CM has started (step S24), and gives an encode stop instruction to the encoder unit 15 (step S25).
Here, the system control unit 18 takes 0.5 frames (16 msec) from when it receives the notification to when it gives the encode stop instruction.
The encoder unit 15 receives the encode stop instruction from the system control unit 18 (step S26) and stops encoding (step S27).
Here, the encoder unit 15 takes 3 frames (96 msecs) from when it receives the encode stop instruction to when it actually stops encoding. This is because it takes an amount of time equal to 3 frames to mute the audio.
This completes the explanation of the sequence that takes place until recording stops. Next, the sequence from recording to playback will be explained.
The detection unit 14 detects a switch from stereo to monaural in the attribute of the audio mode signal (step S28).
Here, the detection takes 0.5 frames (16 msec).
Then, the detection unit 14 judges that the commercial has stopped and the program has started (step S29), and notifies the system control unit 18 that the program has started (step S30).
Here, the judgement takes 1 frame (32 msec). This is because the attributes of the audio mode signal equal to one frame are monitored from when the switch is detected until the signal is confirmed to be monaural.
The system control unit 18 receives notification from the detection unit 14 that the commercial has finished (step S31), and gives an encode start instruction to the encoder unit 15 (step S32).
Here, it takes the system control unit 16 0.5 frames (16 msec) from when it receives notification to give the encode start instruction.
The encoder unit 15 receives the encode start instruction from the system control unit 18 (step S33) and starts encoding (step S34).
In this way, the digital video recording apparatus 10 has a time lag of 5 frames until it stops recording, and 2 frames before it starts recording. Sound and video of the 5 frames until recording actually stops are recorded.
Naturally, time lag varies according to the manufacturer, model, and processing contents of the video recording apparatus.
Note that when there is a copyright protection function the sequence varies from the above-described sequence in that the detection unit 14 monitors the attributes of the copy protect signal, and detects switches in the attributes of the copy protect signal from copy free to copy prohibit. In such a case it is the detection of the switch in attributes of the copy protect signal, rather than the switch in the attributes of the audio mode signal, that takes time.
However, as explained above, a problem arises that when a broadcast that has been recorded using the commercial cut recording is played back, the 5 frames of the commercial that were recorded are also played back.
In other words, the problem is that when commercial cut recording or copyright protection functions are used, frames of sound and video that the user does not wish to play back are played back due to time lag unique to digital video recording apparatuses.
Furthermore, in commercial cut recording in analog video tape recorders (hereinafter “VTR(s)”), a technique is used in which the tape is rewound an amount equivalent to the time lag when recording stops, and this portion of the tape is overwritten (deleted) when recording restarts. This means that effectively video signal equivalent to the time lag is not recorded. It is possible to apply this technique to digital video recording apparatuses and delete the end portion of the VOB equivalent to the time lag, but the processing load would be large, meaning that this technique cannot be easily realized. This is because a VOB is recorded in GOP units in which I, P, and B pictures are mixed. Therefore, it would be necessary for the decoder unit 16 to decode the frame data (field data) into the GOP which includes the end portion, and the encoder unit 15 delete the decoded frame data (field data) which includes the end portion, and re-encode the remaining data. This is a heavy processing load for the system control unit 18 to control. In addition, it is possible that the procedure may not finish in time for recording to restart if the time available for deletion is too short.